package com.example.yuntiku.Servlet;

import com.example.yuntiku.Service.CurriculumService;
import com.example.yuntiku.Service.ExamtypeService;
import com.example.yuntiku.dao.impl.ExamtypeDaoImpl;
import com.example.yuntiku.entity.Curriculum;
import com.example.yuntiku.entity.Examtype;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

@WebServlet(name = "ExamtypeServlet", value = "/ExamtypeServlet")
public class ExamtypeServlet extends HttpServlet {
    public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {
        ExamtypeService examtypeService = new ExamtypeService();
        List<Examtype> list = examtypeService.selectAll();
        request.setAttribute("list",list);
        request.getRequestDispatcher("addexam.jsp").forward(request,response);
    }
}